package magicboard.classifier.feature.features
{
	import magicboard.model.InkStroke;
	
	/**
	 * Base class for feature extractor
	 */
	public class FeatureExtractor{
		
		// --------------------------------------------------------------------------------------------
		public function FeatureExtractor(feid:String){
			
			_id = feid;
		}
		
		// --------------------------------------------------------------------------------------------
		/**
		 * @return map with all available extractors 
		 */
		public static function get extractors():Object{
		
			if(fes == null){
				fes = new Object();
				fes[SegmentCountFeature.ID] = new SegmentCountFeature();
				fes[StartSinFeature.ID] = new StartSinFeature();
				fes[StartCosFeature.ID] = new StartCosFeature();
				fes[EndSinFeature.ID] = new EndSinFeature();
				fes[EndCosFeature.ID] = new EndCosFeature();
			}
			
			return fes;
		}
		
		// --------------------------------------------------------------------------------------------
		public function get id():String { return _id;}
		
		// --------------------------------------------------------------------------------------------
		public function extract(stroke:InkStroke):Number{
			
			return 0;
		}
		
		// --------------------------------------------------------------------------------------------
		// Private members
		private var _id:String;
		private static var fes:Object = null;
	}
}